fix: add root exports trampoline for file:// plugin loading#73
Merged
Conversation
The monorepo refactor removed the root main/exports fields, breaking `"plugin": ["file:///path/to/opencode-lore"]` loading in OpenCode. Root now re-exports from packages/opencode/src/index.ts.
BYK
added a commit
that referenced
this pull request
Apr 17, 2026
## Summary Updates the curator-managed AGENTS.md monorepo architecture entry to document the root trampoline requirement discovered in PR #73. This also serves as the milestone marker for the completed Phase 1 work: ### What shipped (PRs #70–#73) 1. **Monorepo structure** — `packages/core/` (`@loreai/core`) + `packages/opencode/` (`opencode-lore`) 2. **SQLite driver abstraction** — `#db/driver` subpath imports swap `bun:sqlite` ↔ `node:sqlite` at runtime 3. **Zero Bun-specific APIs** — `Bun.CryptoHasher` and `Bun.file` replaced with `node:crypto` and `node:fs` 4. **Root trampoline** — `main`/`exports` in root `package.json` point to the OpenCode plugin so `file:///` loading works 5. **358 tests pass**, both packages typecheck clean ### What's next (Phase 2+) - esbuild build scripts for bundled publish - Host abstraction (`LoreMessage`/`LorePart`, `LLMClient` interface) - Pi extension package (`@loreai/pi`) - Release pipeline (dual-publish under `@loreai` scope)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The monorepo refactor (PR #71) removed the root `main` and `exports` fields, which breaks `"plugin": ["file:///path/to/opencode-lore"]` loading in OpenCode.
Adds a root-level trampoline that points to `packages/opencode/src/index.ts`.
Verified: `bun --eval 'import("/home/byk/Code/opencode-lore")'.` exports `LorePlugin` correctly.